package org.spring.springboot;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import org.spring.springboot.dubbo.CityDubboConsumerService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@EnableDubbo
@SpringBootApplication
public class ClientApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(ClientApplication.class, args);
        CityDubboConsumerService cityDubboConsumerService = run.getBean(CityDubboConsumerService.class);
        cityDubboConsumerService.printCity();
    }
}
